corpus=/home/swlee4skmt/wta/corpus/ek-all
scripts=/home/swlee4skmt/svn_co/smt/copycat/exp/scripts
misc=/home/swlee4skmt/svn_co/smt/copycat/exp/misc


if [ $# == 0 ]; then
	echo -n ""
else
	echo "usage make_next.sh"
	exit
fi


prev_itr=`cat now-itr.var`
let next_itr=$prev_itr+1

echo "Iteration" $prev_itr "->" $next_itr

cd ..
dir=i${next_itr}
rm -rf $dir;

#### Iter
mkdir $dir; cd $dir
ln -s ${scripts}/copycat.sh .
ln -s ${scripts}/copycat-train.sh .
ln -s ${scripts}/make-next.sh .
echo $next_itr > now-itr.var


###### corpus
mkdir corpus; cd corpus;
ln -s ../../i${prev_itr}/copycat/src* .
ln -s ../../i${prev_itr}/copycat/*.txt .
ln -s ../../i0/corpus/tgt* .
cd ..

##### wa
mkdir wa; cd wa;
ln -s ../corpus/src-all.tok src.tok
ln -s ../corpus/tgt-all.tok tgt.tok
ln -s ${scripts}/run-giza.sh .
ln -s ${scripts}/eval.sh .
ln -s ${scripts}/recov.sh .
ln -s ${misc}/giza_st.cfg .
ln -s ${misc}/giza_ts.cfg .
cd ..


# SMT data
mkdir smt; cd smt;
cp ${scripts}/Makefile .
ln -s ../corpus/*.tok .
cd ..;


### end

cd ..
